package com.xlh.openai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xlh.openai.entity.OrderEntity;
import com.xlh.openai.entity.ProductEntity;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author 1280251739@qq.com
 * @email sunlightcs@gmail.com
 * @date 2023-03-31 21:29:05
 */
public interface OrderService extends IService<OrderEntity> {

    /**
     * 根据产品创建订单
     * @param byId
     * @return
     */
    OrderEntity createOrder(ProductEntity byId, Integer userId);

    /**
     * 支付回调更改订单状态，执行新增次数
     * @param outTradeNo
     */
    void paySuccessByNumber(String outTradeNo);

    /**
     * 查询未过期的订单
     * @return
     */
    List<OrderEntity> listNotExpireOrders();


}

